<?php
#
# author: Phil Spagnolo
# (c)2008 South Hill Calvary Chapel
#

include_once("./root.inc.php");
include_once("${root}/mysql/database_info.php");
include_once("${root}/mysql/common.php");
include_once("${root}/common.php");

$title = "Tithes and Offerings";
$meta_key='donate, donation, tithe, tithes, offering, giving, charity, give, share, money, credit, debit, paypal';
$meta_desc="A page to offer tithes and/or offerings to the Lord through South Hill Calvary Chapel";
print_html_head($title ,$meta_key,$meta_desc);
print_java_head("<script type='text/javascript'>window.onload = function() {calculatePreviewFee(); calculateFee();}</script>");
begin_body();
page_title($title);
?>
	<div class='paragraph'>
We live by the principle that where God guides...God provides.  We don't 
ever want anyone to feel obligated to give money to our church.  If you 
are a guest, we would desire that you would sit back and let the Lord
and His Word minister to your heart.  If you count South Hill Calvary 
Chapel as your home church, the Scripture teaches that the responsibility 
to financially support the work is yours...before the Lord.  Our tithes 
and offerings should always be given as an act of worship unto the Lord, 
2 Corinthians 9:6-7.
	</div>
	<div class='paragraph'>
If you would like to give to the Lord through the ministry of 
South Hill Calvary Chapel, tithes and offerings can be given within the 
sanctuary, <a href='./contact.php'> by mail</a>, or online.  When you give
online you can use a credit card, debit card, or PayPal account.	
	</div>
	<div class='paragraph'>
Thank you for supporting the ministry at South Hill Calvary Chapel.
	</div>
	<div class='paragraph'>
When you click donate below, you will be redirected to PayPal where you can choose your payment method.
	</div>
	<div class='paragraph' align='left'>
		<br/>
		<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
		<input type="hidden" id="command" name="cmd" value="_xclick-subscriptions">
		<input type="hidden" name="business" value="ZA3X5L9YSBD8J">
		<input type="hidden" name="lc" value="US">
		<input type="hidden" name="item_number" value="shcc-general">
		<input id="itemName" type="hidden" name="item_name" value="SHCC Recurring General Donation">
		<input type="hidden" name="custom" value="SHCC Recurring General Donation">
		<input type="hidden" name="no_note" value="1">
		<input type="hidden" name="no_shipping" value="2">
		<input type="hidden" name="rm" value="1">
		<input type="hidden" name="return" value="http://www.southhillcalvary.org">
		<input type="hidden" name="cancel_return" value="http://www.southhillcalvary.org">
		<input type="hidden" name="src" value="1">
		<input type="hidden" name="p3" value="1">
		<input type="hidden" name="currency_code" value="USD">
		<input type="hidden" name="page_style" value="SHCC">
		<input type="hidden" name="bn" value="PP-SubscriptionsBF:btn_subscribeCC_LG.gif:NonHosted">
		<h4>What is this donation for?</h4>
		<input type="radio" name="tier2" value="SHCC General" checked="true" onclick="changePurpose(this.value); document.getElementById('moreOptions').style.display='none';">General Donation<br>
		<input type="radio" name="tier2" value="SHCC General" onclick="document.getElementById('moreOptions').style.display='block';">More options...<br>
			<ul id="moreOptions" style="list-style-type:none;display:none;">
				<li><input type="radio"  name="tier2" value="SHCC Missions" onclick="submenu('missions');changePurpose(this.value);">Missions</li>
					<ul class="subMenu" id="missions" style="list-style-type:none;display:none;">
					<?
					connect_select_test("missionaries");
					$missionaries = mysql_query("SELECT * FROM `missionaries` ORDER BY `first` ASC");
					while ($missionary = mysql_fetch_array($missionaries)){
						if (!empty($missionary['donationName'])){
							printf("<li><input type='radio'  name='tier2' value='SHCC %s' onclick='changePurpose(this.value);'>%s</li>\n", $missionary['donationName'], $missionary['donationName']);
						}
					}
					?>
					</ul>
				<li><input type="radio"  name="tier2" value="SHCC Other" onclick="this.nextSibling.disabled=false; changePurpose(this.value); submenu('');"><input type="text" id="customPurpose" onkeyup="changePurpose(('SHCC '+this.value)); this.previousSibling.value=('SHCC '+this.value);" placeholder="Other" disabled="true"></li>	
			</ul>
		<br>
		<h4>How many times would you like this to recur? (including this payment)</h4>
		<br>
		<select id="times" name="srt" onchange="checkForOneTime()">
			<option value="0">Never End</option>
			<option value="1">This Time Only</option>
			<option value="2">2</option>
			<option value="3">3</option>
			<option value="4">4</option>
			<option value="5">5</option>
			<option value="6">6</option>
			<option value="7">7</option>
			<option value="8">8</option>
			<option value="9">9</option>
			<option value="10">10</option>
			<option value="11">11</option>
			<option value="12">12</option>
		</select>
		<br><br>
		<span id="recurring">
			<h4>When would you like this to Recur?</h4>
			<br>
			<select id="when" name="t3">
				<option value="W">Weekly</option>
				<option value="M" selected="selected">Monthly</option>
				<option value="Y">Yearly</option>
			</select>
			<br><br>
		</span>
		<h4>Enter Your Donation Amount:</h4>
		<br>
		$<input id="cash" type="text" name="textField" maxlength="200" onkeyup="calculatePreviewFee()" value="0.00">
		&nbsp;<input type="checkbox" name="addFee" id="addFee" onclick="calculateFee()"> Cover credit card processing fee ($<span id="preview">0.30</span>). 
		<br><br>
		$<span id="donation">0.00</span> donation
		<br>
		$<span id="feeCovered">0.00</span> extra to cover fee
		<hr width="75px" align="left">
		$<span id="total" >0.00</span> total
		<br><br>
		<input type="hidden" id="finalTotal" maxlength="200" name="a3" value="0.00">
		<input type="image" src="/images/Donate.png" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" onclick="getTotalDonation()">
		<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
		</form>	
	</div>
<?php

end_page_title();
end_body();
?>